package com.ymttest.database.sqlwapper;

import java.util.List;

import com.ymt.database.SqlManager;
import com.ymttest.database.mapping.YmtAgentWxCodePicMapper;
import com.ymttest.database.model.YmtAgentWxCodePic;
import com.ymttest.database.model.YmtAgentWxCodePicExample;
import com.ymttest.database.model.stockmgr.agentinventory;
import com.ymttest.database.model.stockmgr.agentinventoryExample;
import com.ymttest.database.model.stockmgr.agentinventorysku;
import com.ymttest.database.model.stockmgr.agentinventoryskuExample;
import com.ymttest.utils.EnvSetup;

public class YmtAgentWxCodePicWapper {
	SqlManager manage;
	public YmtAgentWxCodePicWapper() {
		manage = new SqlManager("intpro");
	}
	
	
	/**
	 * 根据商品id和商户id查询
	 * @param example
	 * @return
	 * @throws InterruptedException
	 */
	public List<YmtAgentWxCodePic> selectBySellerIdAndProductId(Integer SellerId,String ProductId) throws InterruptedException {
		@SuppressWarnings("unchecked")
		YmtAgentWxCodePicExample example=new YmtAgentWxCodePicExample();
		example.createCriteria().andProductIdEqualTo(ProductId).andActionEqualTo(1).andUserIdEqualTo(SellerId);
		List<YmtAgentWxCodePic> pia = manage.getSelectResults("com.ymttest.database.mapping.YmtAgentWxCodePicMapper.selectByExample", example);
		manage.commit();
		return pia;
	}
	
	
}
